/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.qdu.service.impl;

import com.qdu.dao.FavoritesDao;
import com.qdu.dao.impl.FavoritesDaoImpl;
import com.qdu.entity.Book;
import com.qdu.entity.Favorites;
import com.qdu.entity.Movie;
import com.qdu.service.FavoritesService;
import java.util.List;

/**
 *
 * @author Ice
 */
public class FavoritesServiceImpl implements FavoritesService {

    FavoritesDao favoritesDao = new FavoritesDaoImpl();

    @Override
    public int addToFavorites(Favorites f) {
        return favoritesDao.addFavorites(f);
    }

    @Override
    public int deleteFromFavorites(Favorites f) {
        return favoritesDao.deleteFavorites(f);

    }

    @Override
    public List<Book> findBookList(int id) {
        return favoritesDao.getBookList(id);
    }

    @Override
    public List<Movie> findMovieList(int id) {
        return favoritesDao.getMovieList(id);

    }

}
